﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace LearnDI.Controllers
{
    [ApiController]
    [Route("[controller]/[action]")]
    public class HomeController : Controller
    {

        private IClass _class;


        public HomeController(IClass @class)
        {
            this._class = @class;
        }

        [HttpGet]
        // GET: HomeController
        public ActionResult Index()
        {
            _class.Print();
            return new OkObjectResult("按时打卡受打击啊");
        }
    }
}
